﻿<windowControls:ChildWindow x:Class="Soat.HappyNet.Silverlight.Modules.Production.Views.ProductPhotoGalleryView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:windowControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"             
    xmlns:regions="clr-namespace:Microsoft.Practices.Composite.Presentation.Regions;assembly=Microsoft.Practices.Composite.Presentation"
    xmlns:cal="clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation"
    xmlns:behavior="clr-namespace:Soat.HappyNet.Silverlight.Library.Behaviors;assembly=Soat.HappyNet.Silverlight.Library"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:imgtools="clr-namespace:ImageTools.Controls;assembly=ImageTools.Controls"
    Width="500" Height="440" 
    Style="{StaticResource ChildWindowStyle}"
    Title="{Binding Title}">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Border Grid.Row="0" Margin="0" 
                Background="WhiteSmoke" 
                HorizontalAlignment="Stretch" 
                BorderThickness="1" 
                CornerRadius="3" 
                BorderBrush="Black">
            <ScrollViewer Style="{StaticResource ScrollViewerStyle}">
                <Grid>
                    <ItemsControl ItemsSource="{Binding Photos}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <Border BorderThickness="1"
                                        VerticalAlignment="Center"
                                        BorderBrush="{StaticResource DefaultBorderBrush}">
                                    <imgtools:AnimatedImage 
                                        Stretch="Uniform"
                                        Source="{Binding}">
                                    </imgtools:AnimatedImage>
                                </Border>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </Grid>
            </ScrollViewer>
        </Border>
        <Button x:Name="CloseButton" 
                Content="{Binding Strings.APP_Close, Source={StaticResource LocalizedStrings}}" 
                Width="75" 
                Height="23" 
                HorizontalAlignment="Right" 
                Margin="0,5,0,0" 
                Grid.Row="1" 
                Foreground="White" 
                Style="{StaticResource ButtonStyle}"
                Click="CloseButton_Click"/>
    </Grid>
</windowControls:ChildWindow>